<?php
header("Content-type:text/html;charset=utf-8");
// 接收从前端传过来的数据
$id = $_GET["index"];


$conn = mysql_connect("localhost","root","root");

if($conn){
	// echo "连接成功";
	mysql_select_db("project");
}

$result = mysql_query("select * from list where imgid = '$id'",$conn);

if(mysql_num_rows($result)){
	while($obj=mysql_fetch_assoc($result)){
		echo $obj["imgid"]."#".$obj["cname"]."#".$obj["counts"]."#".$obj["price"];
	}
}


// 报错原因竟然是obj没有加$,你可长点心把


mysql_close($conn);


?>